<div style="padding-bottom:10px;">
		<form action="<!--{url('admin','type','property')}-->" method="post" name="popform" id="popform">
			<div class="bk popproperty">
					<ul class="bk_1 clearfix">
						<li>
							<table class="tableStyle" cellspacing="0" cellpadding="0" border="0">
								<thead>
									<tr>
										<th colspan="2">属性</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td width="10%">属性名：</td>
										<td width="20%">
											<input type="text" value="<!--{$property.propertyname}-->" name="propertyname"/>
										</td>
									</tr>
									<tr>
										<td width="10%">录入方式：</td>
										<td width="20%">
						<select name="dptype" onchange="chg2(this.value)">
							<option value="1" <!--{if $property.dptype == 1}-->selected<!--{/if}-->>从可选择值中选择，前台可过滤</option>
							<option value="2" <!--{if $property.dptype == 2}-->selected<!--{/if}-->>从可选择值中选择，前台不可过滤</option>
							<option value="3" <!--{if $property.dptype == 3}-->selected<!--{/if}-->>手动输入，前台不可过滤</option>
						</select>
										</td>
									</tr>
									<tr>
										<td width="10%">前台显示：</td>
										<td width="20%">
											<input type="checkbox" value="1" name="isdp" <!--{if $property.isdp}-->checked<!--{/if}--> />
										</td>
									</tr>
								</tbody>
							</table>
						</li>
						<li id="value2" <!--{if $property.dptype == 3}-->class="none"<!--{/if}-->>
							<table class="tableStyle" cellspacing="0" cellpadding="0" border="0">
								<thead>
									<tr>
										<th width="50%">操作</th>
										<th width="50%">属性值</th>
									</tr>
								</thead>
								<tbody id="listvalue">
									<!--{foreach $propertyvalues value}-->
									<tr align="center">
										<td width="50%">
				<a href="javascript:void(0);" onclick="$.oper.up(this);return false;"	class="up"></a>
				<a href="javascript:void(0);" onclick="$.oper.down(this);return false;"  class="down"></a>
				<a href="javascript:void(0);" onclick="$.oper.del(this);return false;"   class="del"></a>
										</td>
										<td width="50%">
											<input type="text" value="<!--{$value.propertyvalue}-->" name="values[key_<!--{$value.valueid}-->]" size="40"/>
										</td>
									</tr>
									<!--{/foreach}-->
								</tbody>
							</table>
						</li>
					</ul>
			</div>
			<div style="margin-left:25px;" id="add2" <!--{if $property.dptype == 3}-->class="none"<!--{/if}-->>
				<a href="javascript:" onclick="addValue()" class="bt_style2">增加属性值</a>
			</div>
				<input type="hidden" value="<!--{$property.propertyid}-->" name="propertyid"/>
		</form>
		<div class="bt_bk2">
			<a href="javascript:void(0);" class="btn" onclick="$('#popform').submit();return false;"><span>保存</span></a>
			<a href="javascript:void(0);" class="btn" onclick="$.tbox.close();return false;"><span>关闭</span></a>
		</div>
</div>
<script type="text/javascript">
function addValue() {
	var $html  = $("#forvalue").clone();
	$("#listvalue").append($html.html());
}
function chg2(dptype) {
	if(dptype == 3) {//隐藏属性值
		$("#add2,#value2").hide();
	} else {
		$("#add2,#value2").show();
	}
}
</script>

